package net.sk.china.city.domain;

import net.sk.china.city.domain.dto.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 地区的树形关系对象 ar_region_relation
 * 
 * @author ruoyi
 * @date 2024-05-28
 */
public class ArRegionRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long pkId;

    /** 祖节点id */
    private Long ancestorId;

    /** 后代节点id */
    private Long descendant;

    /** 后代节点到祖节点的距离 */
    private Long distance;

    public void setPkId(Long pkId) 
    {
        this.pkId = pkId;
    }

    public Long getPkId() 
    {
        return pkId;
    }
    public void setAncestorId(Long ancestorId) 
    {
        this.ancestorId = ancestorId;
    }

    public Long getAncestorId() 
    {
        return ancestorId;
    }
    public void setDescendant(Long descendant) 
    {
        this.descendant = descendant;
    }

    public Long getDescendant() 
    {
        return descendant;
    }
    public void setDistance(Long distance) 
    {
        this.distance = distance;
    }

    public Long getDistance() 
    {
        return distance;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("pkId", getPkId())
            .append("ancestorId", getAncestorId())
            .append("descendant", getDescendant())
            .append("distance", getDistance())
            .toString();
    }
}
